/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.lostreseditores.logica;

import com.lostreseditores.modelo.Presentaexamen;
import com.lostreseditores.modelo.PresentaexamenPK;
import com.lostreseditores.persistencia.PresentaexamenFacadeLocal;
import java.util.List;
import javax.ejb.EJB;
import javax.ejb.Stateless;

/**
 *
 * @author DILOVE
 */
@Stateless
public class PresentaExamenLogica implements PresentaExamenLogicaLocal {
    @EJB
    private PresentaexamenFacadeLocal presentaExamenDAO;
    @Override
    public void registrar(Presentaexamen presentaexamen) throws Exception {
        presentaExamenDAO.create(presentaexamen);
    }

    @Override
    public void modificar(Presentaexamen presentaexamen) throws Exception {        
        presentaExamenDAO.edit(presentaexamen);
    }

    @Override
    public void eliminar(Presentaexamen presentaexamen) throws Exception {
        presentaExamenDAO.remove(presentaexamen);
    }

    @Override
    public Presentaexamen consultarPorId(PresentaexamenPK presentaExamen) throws Exception {
        return presentaExamenDAO.find((Object)presentaExamen);
    }

    @Override
    public List<Presentaexamen> consultar() throws Exception {
        return presentaExamenDAO.findAll();
    }
}
